<?
session_start();

include('./../config/db_settings.php');
include('./../pms/pms_inc.php');
include('bookmarks_inc.php');

$user = $_SESSION[$settings['session_prefix'].'user_id'];

header("Location:bookmarks.php");

//Are they logged in or not?
if(!$user)
{
}
else
{

	//A foreach loop for each bm in the array, get the values and set it as $bm_id because they were the ones selected for deletion
	foreach($_POST['bms'] as $num => $bm_id)
	{
		mysql_query("DELETE FROM ".$db_settings['bookmarks_table']." WHERE bookmark_id='$bm_id' AND user_id='$user'");
	}

}
?>